package com.lucas.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.lucas.pojo.Lagou_token;

/**
 * @program: spring_cloud_lagou_homework
 * @author: lucasLu
 * extends IService<lagou_token>
 **/
public interface TokenService extends IService<Lagou_token>{

    /**
     * 根据token获取对应邮箱
     * @param token
     * @return
     */
    String getEmailByToken(String token);

    /**
     * 根据邮箱,获取或创建token
     * @param mail
     * @return
     */
    String getOrCreatToken(String mail);
}
